// layui 图片懒加载
layui.flow.lazyimg();
//导航切换
var btn = $('.nav').find('.nav-list').children('button')
,spa = btn.children('span')
,ul = $('.nav').find('.nav-list').children('.layui-nav');
btn.on('click', function(){
  if(!$(spa[0]).hasClass('spa1')){
    spa[0].className = 'spa1';
    spa[1].style.display = 'none';
    spa[2].className = 'spa3';
    $('.nav')[0].style.height = 80 + ul[0].offsetHeight + 'px';
  }else{
    spa[0].className = '';
    spa[1].style.display = 'block';
    spa[2].className = '';
    // $('.nav')[0].style.height = 80 + 'px';
    $('.nav')[0].style.height = '0.8rem';
  }
});
//轮播文字
$(function(){
  $('.banner').children('.title').addClass('active');
})

/**
 * 滚动动画
 */
if (!(/msie [6|7|8|9]/i.test(navigator.userAgent))){
	new WOW().init();
};